package com.shz.appletsapi.controller;

import java.util.Map;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.shz.appletsapi.common.LahuoControllerResult;
import com.shz.appletsapi.common.support.ParamsEditor;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class HotkeyController {
	

	@InitBinder   
	public void initBinder(WebDataBinder binder){  
	    binder.registerCustomEditor(Map.class,  new ParamsEditor());   
	}  

	@PostMapping("/hello")
	public LahuoControllerResult hello(@RequestParam("params") Map map) {
		log.info("userId:" + map.get("userId"));
		log.info("idlist:" + map.get("idlist"));
		return new LahuoControllerResult();
	}

}
